<?php
/**
 * Class oeQuestion
 * @method string getId()
 * @method string getName()
 * @method string getCategoryId()
 * @method string getLabel()
 * @method string getQuestionType()
 * @method string getMarks()
 * @method string getStatus()
 * @method string getCaseSensitive()
*  @method string setId()
 * @method string setName()
 * @method string setCategoryId()
 * @method string setLabel()
 * @method string setQuestionType()
 * @method string setMarks()
 * @method string setStatus()
 * @method string setCaseSensitive()
 */
class oeQuestion extends dbObject {

	const QUESTION_STATUS_ACTIVE = 0;
	const QUESTION_STATUS_DRAFT = 1;
	const QUESTION_STATUS_ARCHIEVED = 2;
	
	const QUESTION_QUESTIONTYPE_TRUEFALSE = 0;

    // login salt for security purposes
    private $loginSalt = 'agt22';
	
	public static function create($params) {
			
		$obj = new oeQuestion();	
		if (isset($params['id']))	
			$obj = new oeUser($params['id']);
		
		$obj->setName($params['name']);
		$obj->setCategoryId($params['categoryId']);
		$obj->setLabel($params['label']);
		$obj->setQuestionType($params['questionType']);
		$obj->setMarks($params['marks']);
		$obj->setStatus($params['status']);
		$obj->setCaseSensitive($params['caseSensitive']);
		$obj->commit();
		
		return $obj->getId();
	}

	public function getCategory() {
		
	}

	public function isActive() {
		
	}
	
	public function isDraft() {
		
	}
	
	public function isArchieved() {
		
	}
}